package wang.aweb.childcar.model.dao;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import wang.aweb.childcar.model.pojo.Agent;
import wang.aweb.childcar.model.query.AgentParam;

import java.util.List;

@Repository
public interface AgentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Agent record);

    int insertSelective(Agent record);

    Agent selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Agent record);

    int updateByPrimaryKey(Agent record);

    List<Agent> selectAll();

    List<Agent> selectList(@Param("query") AgentParam query);

    Agent selectByUsername(String username);

    void updateMoneyById(@Param("id") Integer id, @Param("money") Integer comrateMoney);

    Agent selectLogin(@Param("username") String username, @Param("password") String password);


    Agent selectByMobile(String agentmobile);
}